﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ATM
{
    class WarningState : AccountState
    {
        Account account;
        public WarningState(Account account)
        {
            this.account = account;
        }

        public double Deposit(double amount)
        {
            account.Balance += amount;
            account.ChangeState();
            return account.Balance;
        }

        public double Withdraw(double amount)
        {
            return account.Balance;
        }
    }
}
